Leveraging Permitting and Zoning Data to Predict Upzoning Pressure, Philadelphia
Author
Laura Frances and Nissim Lebovits
Published
December 13, 2023
This model and web application prototype were developed for MUSA508, a Master of Urban Spatial Analytics class focused on predictive public policy analytics at the University of Pennsylvania.
1 Objective
Growth is critical for a city to continue to densify and modernize. The benefits of growth range from increased public transit use to updating the built environment to be more climate resilient. Growth fuels development and vice versa. In Philadelphia, the US’s 6th largest city that ranks 42nd in cost of living, growth is met with concern. Many residents and preservationists ask: Will growth deteriorate the city’s best features? Will modernization make the city unaffordable to longtime residents?
Balancing growth with affordability is a precarious task for Philadelphia. To date, politicians favor making exceptions for developers parcel by parcel rather than championing a smart growth citywide strategy. Zoning advocates need better data-driven tools to broadcast the benefits of a smart growth approach, a planning framework that aims to maximize walkability and transit use to avoid sprawl, that also demonstrates how parcel-by-parcel, or spot zoning, creates unmet development pressure that can drive costs. SmartZoning is a prototype web tool that identifies parcels under development pressure with conflicting zoning. Users can strategically leverage the tool to promote proactive upzoning of high-priority parcels, aligning current zoning more closely with anticipated development. This approach aims to foster affordable housing in Philadelphia, addressing one of the city’s most pressing challenges.
Smart Growth meets SmartZoning
2 Introduction
The following documentation details the development of a predictive model, which has demonstrated remarkable effectiveness in predicting future development patterns with a low mean absolute error. By accurately forecasting where growth is likely to occur using past permitting data against where current zoning may hinder growth, this model serves as a critical backbone to SmartZoning’s functionality. The study also considers the relationship between development pressure with race, income, and housing cost burden to strengthen the predictive model and investigate the impacts of development locally and city-wide.
This study leverages open data sources including permit counts, council district boundaries, racial mix, median income, housing cost burden to holistically understand what drives development pressure. Generally, data is collected at the block group or parcel level and aggregated up to the council district to capture both local and more citywide trends.
[Insert Hyperlinked Data Sources Table Here Columns: Data Type - Source (linked) - Geo Level]
https://quarto.org/docs/authoring/tables.html
Data Type
Source
Geo Level
12
12
12
123
123
123
1
1
a
3.1 Permits
Firstly, 10 years of permit data from 2012 to 2023 from the Philadelphia Department of Licenses and Inspections are critical to the study. This study filters only for new construction permits granted for residential projects. In the future, filtering for full and substantial renovations could add more nuance to what constitutes as development pressure.
Title: New Construction Permits per Year Subtitle: Philadelphia, PA
The spike in new construction permits in 2021 is reasonably attributed to the expiration of a tax abatement program for developers.
When assessing new construction permit count by Council Districts, a few districts issued the bulk of new permits during that 2021 peak. Hover over the lines to see more about the volume of permits and who granted them.
Show the code
perms_x_dist <-st_join(building_permits, council_dists)perms_x_dist_sum <- perms_x_dist %>%st_drop_geometry() %>%group_by(DISTRICT, year) %>%summarize(permits_count =n())perms_x_dist_mean = perms_x_dist_sum %>%group_by(year) %>%summarize(permits_count =mean(permits_count)) %>%mutate(DISTRICT ="Average")perms_x_dist_sum <-bind_rows(perms_x_dist_sum, perms_x_dist_mean) %>%mutate(color =ifelse(DISTRICT !="Average", 0, 1))ggplotly(ggplot(perms_x_dist_sum %>%filter(year >2013, year <2024), aes(x = year, y = permits_count, color =as.character(color), group =interaction(DISTRICT, color))) +geom_line(lwd =0.7) +labs(title ="Permits per Year by Council District",y ="Total Permits") +# facet_wrap(~DISTRICT) +theme_minimal() +theme(axis.title.x =element_blank(),legend.position ="none") +scale_color_manual(values =c(palette[5], palette[1])))
3.1.1 Feature Engineering by Time and Space
To better understand the relationship between time-space lag and permit count,… Notably…
Racial Mix (white vs non-white), median income, and housing cost burden are socioeconomic factors that often play an outsized role in affordability in cities like Philadelphia, with a pervasive and persistent history of housing discrimination and systemic disinvestment. This data is all pulled from the US Census Bureau’s American Community Survey 5-Year survey.
Spatially, is clear that non-white communities earn lower median incomes and experience higher rates of extreme rent burden (household spends more than 35% of income on gross rent).
Considering the strong spatial relationship between socioeconomics and certain areas of Philadelphia, we will be sure to investigate our model’s generalizability against race and income.
4 Build Predictive Models
“All the complaints about City zoning regulations really boil down to the fact that City Council has suppressed infill housing or restricted multi-family uses, which has served to push average housing costs higher.” - Jon Geeting, Philly 3.0 Engagement Director
SmartZoning® seeks to predict where permits are most likely to be filed as a measure to predict urban growth. As discussed, predicting growth is fraught because growth is influenced by political forces rather than by plans published by the city’s Planning Commission. Comprehensive plans, typically set on ten-year timelines, tend to become mere suggestions, ultimately subject to the prerogatives of city council members rather than serving as steadfast guides for smart growth. With these dynamics in mind, SmartZoning’s prediction model accounts for socioeconomics, council district, and time-space lag.
4.1 Tests for Correlation
The goal is to select variables that most significantly correlate to permit count to include in the predictive model. Correlation is a type of association test. For example, are permit counts more closely associated to population or to median income? Or, do racial mix and rent burden offer redundant insight? These are the types of subtle but important distinctions we aim to seek out.
Notably, permit count does not have a particularly strong correlation to any of our selected variables. This may lead one to the conclusion that permits are evenly distributed throughout the city. However, as we can see below, there are few block groups with more 50 permits. This indicates that permits are granted on a block by block across all districts. The need for SmartZoning is applicable for most Philadelphia neighborhoods, not just a select few.
Show the code
ggplot(building_permits %>%filter(!year %in%c(2024)), aes(x =as.factor(year))) +geom_bar(fill = palette[1], color =NA, alpha =0.7) +labs(title ="Permits per Year") +theme_minimal()
Show the code
ggplot(permits_bg %>% st_drop_geometry %>%filter(!year %in%c(2024)), aes(x = permits_count)) +geom_histogram(fill = palette[1], color =NA, alpha =0.7) +labs(title ="Permits per Block Group per Year",subtitle ="Log-Transformed") +scale_x_log10() +facet_wrap(~year) +theme_minimal()
Make sure to note that we train, test, and then validate. So these first models are based on 2022 data, and then we run another on 2023 (and then predict 2024 at the end).
4.3.1 OLS
4.3.2 Random Forest
5 Train and Test Predictive Models
5.0.1 OLS Regression
To begin, we run a simple regression incorporating three engineered groups of features: space lag, time lag, and distance to 2022. We include this last variable because of a Philadelphia tax abatement policy that led to a significant increase in residential development in the years immediately before 2022. We will use this as a baseline model to compare to our more complex models.
(We considered a Poisson model but found that it struggled with outliers.)
Show the code
ggplot(ols_preds, aes(x = permits_count, y = ols_preds)) +geom_point() +labs(title ="Predicted vs. Actual Permits",subtitle ="2022") +geom_abline(color = palette[3]) +theme_minimal()
Show the code
ggplot(ols_preds, aes(x = abs_error)) +geom_histogram(fill = palette[3], color =NA, alpha =0.7) +labs(title ="Distribution of Absolute Error per Block Group",subtitle ="OLS, 2022") +theme_minimal()
We find that our OLS model has an MAE of only MAE: 2.66–not bad for such a simple model! Still, it struggles most in the areas where we most need it to succeed, so we will try to introduce better variables and apply a more complex model to improve our predictions.
5.0.2 Random Forest Regression: Testing
We train and test up to 2022–we use this for model tuning and feature engineering.
We find that error is not related to affordability and actually trends downward with percent nonwhite. (This is probably because there is less total development happening there in majority-minority neighborhoods to begin with, so the magnitude of error is less, even though proportionally it might be more.) Error increases slightly with total pop. This makes sense–more people –> more development.
Show the code
ggplot(rf_val_preds, aes(y = abs_error, x = rent_burden)) +# or whatever the variable isgeom_point() +geom_smooth(method ="lm", se=FALSE, color = palette[3]) +theme_minimal()
Show the code
ggplot(rf_val_preds, aes(y = abs_error, x = percent_nonwhite)) +# or whatever the variable isgeom_point() +geom_smooth(method ="lm", se=FALSE, color = palette[3]) +theme_minimal()
Show the code
ggplot(rf_val_preds, aes(y = abs_error, x = total_pop)) +# or whatever the variable isgeom_point() +geom_smooth(method ="lm", se=FALSE, color = palette[3]) +theme_minimal()
Show the code
ggplot(rf_val_preds, aes(y = abs_error, x = med_inc)) +# or whatever the variable isgeom_point() +geom_smooth(method ="lm", se=FALSE, color = palette[3]) +theme_minimal()
How does this generalize across council districts? Don’t forget to refactor
Show the code
suppressMessages(ggplot(rf_val_preds, aes(x =reorder(district, abs_error, FUN = mean), y = abs_error)) +geom_boxplot(fill =NA, color = palette[3]) +labs(title ="MAE by Council District",y ="Mean Absolute Error",x ="Council District") +theme_minimal())
7 Assessing Upzoning Pressure
We can identify conflict between projected development and current zoning.
Look at zoning that is industrial or residential single family in areas that our model suggests are high development risk for 2023:
Furthermore, we can identify properties with high potential for assemblage, which suggests the ability to accomodate high-density, multi-unit housing.
Show the code
nbs <- filtered_zoning %>%mutate(nb =st_contiguity(geometry))# Create edge list while handling cases with no neighborsedge_list <- tibble::tibble(id =1:length(nbs$nb), nbs = nbs$nb) %>% tidyr::unnest(nbs) %>%filter(nbs !=0)# Create a graph with a node for each row in filtered_zoningg <-make_empty_graph(n =nrow(filtered_zoning))V(g)$name <-as.character(1:nrow(filtered_zoning))# Add edges if they existif (nrow(edge_list) >0) { edges <-as.matrix(edge_list) g <-add_edges(g, c(t(edges)))}# Calculate the number of contiguous neighbors, handling nodes without neighborsn_contiguous <-sapply(V(g)$name, function(node) {if (node %in% edges) {length(neighborhood(g, order =1, nodes =as.numeric(node))[[1]]) } else {1# Nodes without neighbors count as 1 (themselves) }})filtered_zoning <- filtered_zoning %>%mutate(n_contig = n_contiguous)filtered_zoning %>%st_drop_geometry() %>%select(rf_val_preds, n_contig, OBJECTID, CODE) %>%filter(rf_val_preds >10, n_contig >2) %>%arrange(desc(rf_val_preds)) %>%kablerize(caption ="Poorly-Zoned Properties with High Development Risk")
Poorly-Zoned Properties with High Development Risk